<template>
    <div class="login">
        <div class="login_inner">
            <p>图形化流程设计工具</p>
            <div class="login_inner_form">
                <p>用户登录</p>
                <el-input placeholder="请输入用户名" prefix-icon="el-icon-user" v-model="userName"></el-input>
                <el-input placeholder="请密码" type="password" prefix-icon="el-icon-lock" v-model="password"></el-input>
                <div class="remeber_keyWord">
                    <el-checkbox v-model="checked">记住密码</el-checkbox>
                    <span>忘记密码</span>
                </div>
                <div class="login_btn" @click="login">
                    登录
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            userName:'',
            password: '',
            checked:false,
        }
    },
    methods: {
        login() {
            localStorage.setItem('userInfo', 'admin');
            location.reload()
         }
    },
}
</script>

<style lang="less">
.login {
    width: 100%;
    height: 100%;
    background-image: url('../assets/login_bg.jpg');
    background-size: 100% 100%;
    position: relative;
    .login_inner {
        position: absolute;
        top: 10%;
        right: 300px;
        color: grey;
        >p {
            width: 540px;
            height: 84px;
            font-size: 60px;
            font-family: PingFang SC;
            font-weight: bold;
            color: #FFFFFF;
            margin-bottom: 30px;
        }
        .login_inner_form {
            width: 500px;
            height: 490px;
            background: #FFFFFF;
            box-shadow: 0px 3px 6px rgba(0,0,0,0.16);
            border-radius: 6px;
            margin: 0 auto;
            text-align: center;
            padding-top: 30px;
            .yonghu{
                background-image: url('../assets/yonghu.png');
            }
            >p {
                height: 56px;
                font-size: 40px;
                font-family: PingFang SC;
                font-weight: 500;
                color: #000000;
                margin-bottom: 80px;
            }

            .el-input {
                width: calc(100% - 240px);
                margin: 10px 0;
            }
            .el-checkbox {
                 color: grey;
            }
            .remeber_keyWord {
                width: calc(100% - 240px);
                margin: auto;
                display: flex;
                justify-content: space-between;
            }
            .login_btn {
                width: 260px;
                height: 40px;
                margin: 40px auto 0;
                background: #4171C4;
                opacity: 1;
                border-radius: 6px;

                font-size: 20px;
                line-height: 40px;
                font-family: PingFang SC;
                font-weight: 500;
                color: #FFFFFF;
            }
        }
    }
}
</style>